<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Iaas搭建 | Element</title><meta name="keywords" content="IaaS"><meta name="author" content="FHang"><meta name="copyright" content="FHang"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="description" content="Iaas搭建  以上是IAAS平台的基本环境配置，这些服务配置将在接下来的内容了呈现 controller和compute两节点都要打开 1.主机名的配置12345678910111213controller：\#hostnamectl set-hostname controller\#bash compute：\#hostnamectl set-hostname compute\#bash">
<meta property="og:type" content="article">
<meta property="og:title" content="Iaas搭建">
<meta property="og:url" content="https://fhangh.gitee.io/article/264a9a95.html">
<meta property="og:site_name" content="Element">
<meta property="og:description" content="Iaas搭建  以上是IAAS平台的基本环境配置，这些服务配置将在接下来的内容了呈现 controller和compute两节点都要打开 1.主机名的配置12345678910111213controller：\#hostnamectl set-hostname controller\#bash compute：\#hostnamectl set-hostname compute\#bash">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_07.jpg">
<meta property="article:published_time" content="2020-11-05T08:48:05.598Z">
<meta property="article:modified_time" content="2021-03-14T05:49:51.653Z">
<meta property="article:author" content="FHang">
<meta property="article:tag" content="IaaS">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_07.jpg"><link rel="shortcut icon" href="/fhangh/img/fh.png"><link rel="canonical" href="https://fhangh.gitee.io/article/264a9a95"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="yandex-verification" content="{&quot;theme_color&quot;:{&quot;enable&quot;:true,&quot;main&quot;:&quot;#49B1F5&quot;,&quot;paginator&quot;:&quot;#00c4b6&quot;,&quot;button_hover&quot;:&quot;#FF7242&quot;,&quot;text_selection&quot;:&quot;#00c4b6&quot;,&quot;link_color&quot;:&quot;#99a9bf&quot;,&quot;meta_color&quot;:&quot;#858585&quot;,&quot;hr_color&quot;:&quot;#A4D8FA&quot;,&quot;code_foreground&quot;:&quot;#F47466&quot;,&quot;code_background&quot;:&quot;rgba(27, 31, 35, .05)&quot;,&quot;toc_color&quot;:&quot;#00c4b6&quot;,&quot;blockquote_padding_color&quot;:&quot;#49b1f5&quot;,&quot;blockquote_background_color&quot;:&quot;#49b1f5&quot;}}"/><link rel="stylesheet" href="/fhangh/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css"><script>var GLOBAL_CONFIG = { 
  root: '/fhangh/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  ClickShowText: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"top-right"},
  justifiedGallery: {
    js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
    css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: false
};

var saveToLocal = {
  set: function setWithExpiry(key, value, ttl) {
    const now = new Date()
    const expiryDay = ttl * 86400000
    const item = {
      value: value,
      expiry: now.getTime() + expiryDay,
    }
    localStorage.setItem(key, JSON.stringify(item))
  },

  get: function getWithExpiry(key) {
    const itemStr = localStorage.getItem(key)

    if (!itemStr) {
      return undefined
    }
    const item = JSON.parse(itemStr)
    const now = new Date()

    if (now.getTime() > item.expiry) {
      localStorage.removeItem(key)
      return undefined
    }
    return item.value
  }
}</script><script id="config_change">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-03-14 13:49:51'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(function () {  window.activateDarkMode = function () {
    document.documentElement.setAttribute('data-theme', 'dark')
    if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
    }
  }
  window.activateLightMode = function () {
    document.documentElement.setAttribute('data-theme', 'light')
   if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
    }
  }
  const autoChangeMode = 'false'
  const t = saveToLocal.get('theme')
  if (autoChangeMode === '1') {
    const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
    const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
    const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
    const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
    if (t === undefined) {
      if (isLightMode) activateLightMode()
      else if (isDarkMode) activateDarkMode()
      else if (isNotSpecified || hasNoSupport) {
        const now = new Date()
        const hour = now.getHours()
        const isNight = hour <= 6 || hour >= 18
        isNight ? activateDarkMode() : activateLightMode()
      }
      window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
        if (saveToLocal.get('theme') === undefined) {
          e.matches ? activateDarkMode() : activateLightMode()
        }
      })
    } else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else if (autoChangeMode === '2') {
    const now = new Date()
    const hour = now.getHours()
    const isNight = hour <= 6 || hour >= 18
    if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
    else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else {
    if (t === 'dark') activateDarkMode()
    else if (t === 'light') activateLightMode()
  }const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
   if (asideStatus === 'hide') {
     document.documentElement.classList.add('hide-aside')
   } else {
     document.documentElement.classList.remove('hide-aside')
   }
}})()</script><meta name="generator" content="Hexo 5.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" data-lazy-src="/fhangh/img/fh.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/archives/"><div class="headline">文章</div><div class="length-num">26</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/tags/"><div class="headline">标签</div><div class="length-num">10</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/fhangh/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/fhangh/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/fhangh/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page" href="/fhangh/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li><li><a class="site-page" href="/fhangh/Gallery/"><i class="fa-fw fas fa-images"></i><span> Image</span></a></li></ul></div></div></div></div><div id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url(https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img/postImg_07.jpg)"><nav id="nav"><span id="blog_name"><a id="site-name" href="/fhangh/">Element</a></span><span id="menus"><div id="search_button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/fhangh/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/fhangh/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/fhangh/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page" href="/fhangh/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li><li><a class="site-page" href="/fhangh/Gallery/"><i class="fa-fw fas fa-images"></i><span> Image</span></a></li></ul></div></div><span class="close" id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></span></span></nav><div id="post-info"><h1 class="post-title">Iaas搭建</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-11-05T08:48:05.598Z" title="发表于 2020-11-05 16:48:05">2020-11-05</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-03-14T05:49:51.653Z" title="更新于 2021-03-14 13:49:51">2021-03-14</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/fhangh/categories/%E4%BA%91%E8%AE%A1%E7%AE%97/">云计算</a></span></div><div class="meta-secondline"> <span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">3.1k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>12分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="Iaas搭建"><a href="#Iaas搭建" class="headerlink" title="Iaas搭建"></a>Iaas搭建</h1><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/1.png">

<p>以上是IAAS平台的基本环境配置，这些服务配置将在接下来的内容了呈现</p>
<p>controller和compute两节点都要打开</p>
<h4 id="1-主机名的配置"><a href="#1-主机名的配置" class="headerlink" title="1.主机名的配置"></a>1.主机名的配置</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">controller：</span><br><span class="line"></span><br><span class="line">\#hostnamectl set-hostname controller</span><br><span class="line"></span><br><span class="line">\#bash</span><br><span class="line"></span><br><span class="line"> </span><br><span class="line"></span><br><span class="line">compute：</span><br><span class="line"></span><br><span class="line">\#hostnamectl set-hostname compute</span><br><span class="line"></span><br><span class="line">\#bash</span><br></pre></td></tr></table></figure>


<h4 id="2-配置映射文件"><a href="#2-配置映射文件" class="headerlink" title="2.配置映射文件"></a>2.配置映射文件</h4><p>controller和compute都要配置</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\#vi &#x2F;etc&#x2F;hosts</span><br></pre></td></tr></table></figure>


<p>进行如下配置：</p>
<p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/2.png">保存退出</p>
<h4 id="3-配置controller的yum源"><a href="#3-配置controller的yum源" class="headerlink" title="3.配置controller的yum源"></a>3.配置controller的yum源</h4><p>首先配置controller的yum源</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#cd &#x2F;etc&#x2F;yum.repos.d&#x2F;</span><br><span class="line"> </span><br><span class="line">\#rm -rvf *</span><br><span class="line"></span><br><span class="line">\#vi [ftp.repo](http:&#x2F;&#x2F;ftp.repo) | 创建源文件</span><br><span class="line"></span><br></pre></td></tr></table></figure>


<p>配置内容如下：</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/3.png">

<p>compute的yum源先不急着配</p>
<h4 id="4-挂载iso文件（上一篇上传镜像后，才能继续进行接下来的IAAS搭建）"><a href="#4-挂载iso文件（上一篇上传镜像后，才能继续进行接下来的IAAS搭建）" class="headerlink" title="4.挂载iso文件（上一篇上传镜像后，才能继续进行接下来的IAAS搭建）"></a>4.挂载iso文件（上一篇上传镜像后，才能继续进行接下来的IAAS搭建）</h4><p>在上一篇中提到一个小镜像cirros-0.3.4-x86_64-disk.img，此时也可以进行下一步，对电脑配置自信的可以忽略，</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]# </span><br><span class="line"></span><br><span class="line">\#cd</span><br><span class="line"></span><br><span class="line">\#cd &#x2F;opt&#x2F; </span><br><span class="line"></span><br><span class="line">\#mkdir  &#123;centos，iaas&#125;   | （在&#x2F;opt 目录下建立两个文件夹，用来挂载接下来的两个镜像文件）  </span><br><span class="line"></span><br><span class="line">\#mkdir  cirros  |  （此处选做）</span><br><span class="line">  </span><br><span class="line">\#cd</span><br><span class="line"></span><br><span class="line">\#mount -o loop CentOS-7-x86_64-DVD-1511.iso &#x2F;opt&#x2F;centos&#x2F;  |  （上传Centos的镜像到centos文件夹下）  </span><br><span class="line">  </span><br><span class="line">\#mount -o loop XianDian-IaaS-v2.2.iso &#x2F;opt&#x2F;iaas&#x2F;  |  （此处和上面同理）  </span><br><span class="line">    </span><br><span class="line">\#mount -o  loop cirros-0.3.4-x86_64-disk.img  &#x2F;opt&#x2F;cirros&#x2F;  </span><br></pre></td></tr></table></figure>
<p>挂载成功会出现read-only等字样</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#yum clean  all      （清除缓存）  </span><br><span class="line"></span><br><span class="line">#yum list      （验证yum源）  </span><br></pre></td></tr></table></figure>


<h4 id="5-搭建ftp服务器，开启并设置自启"><a href="#5-搭建ftp服务器，开启并设置自启" class="headerlink" title="5.搭建ftp服务器，开启并设置自启"></a>5.搭建ftp服务器，开启并设置自启</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">#yum install  -y vsftpd    （搭建ftp服务器）    </span><br><span class="line"></span><br><span class="line">#vi &#x2F;etc&#x2F;vsftpd&#x2F;vsftpd.conf    （修改ftp的配置文件）  </span><br></pre></td></tr></table></figure>


<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/4.png">

<p>如上图所示，在原文本中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">anon_root&#x3D;&#x2F;opt&#x2F;</span><br></pre></td></tr></table></figure>
<p>保存退出</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#systemctl  restart vsftpd      （重启ftp服务）  </span><br><span class="line"></span><br><span class="line">#systemctl enable vsftpd      （设置开机自启）  </span><br></pre></td></tr></table></figure>


<h4 id="6-关闭防火墙并设置开机不自启"><a href="#6-关闭防火墙并设置开机不自启" class="headerlink" title="6.关闭防火墙并设置开机不自启"></a>6.关闭防火墙并设置开机不自启</h4><p>controller和compute都要做：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#setenforce 0</span><br><span class="line"></span><br><span class="line">#getenforce      （出现Permissive则表示防火墙的安全级别已经降低了）  </span><br></pre></td></tr></table></figure>


<p>这种方式时临时的，如果重启了虚拟机，需要再执行一次</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">#systemctl  stop firewalld    （关闭防火墙）    </span><br><span class="line"></span><br><span class="line">#systemctl  disable firewalld    （设置防火墙开机不自启）  </span><br></pre></td></tr></table></figure>


<h4 id="7-配置compute的yum源"><a href="#7-配置compute的yum源" class="headerlink" title="7.配置compute的yum源"></a>7.配置compute的yum源</h4><p>先前已经配好了controller的yum源，这里只要用scp传过来，进行一些修改即可</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[root@compute ~]#</span><br><span class="line"></span><br><span class="line">\#cd &#x2F;etc&#x2F;yum.reops.d&#x2F;</span><br><span class="line"></span><br><span class="line">\#rm -rvf *</span><br><span class="line"></span><br><span class="line">\#scp 192.168.100.10:&#x2F;&#x2F;etc&#x2F;yum.repos.d&#x2F;* .</span><br><span class="line"></span><br><span class="line">出现（yes&#x2F;no）和password就依次填写yes和000000，后面还会遇到几次，也是同样的方法</span><br><span class="line"></span><br><span class="line">\#cd &#x2F;etc&#x2F;yum.repos.d&#x2F;</span><br><span class="line"></span><br><span class="line">\#vi [ftp.repo</span><br></pre></td></tr></table></figure>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/5.png">

<p>照着上图进行修改从controller传来的ftp.repo文件内容即可</p>
<p>接着顺便清除缓存和验证compute的yum源</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">\#cd</span><br><span class="line"></span><br><span class="line">\#yum clean all</span><br><span class="line"></span><br><span class="line">\#yum list</span><br></pre></td></tr></table></figure>
<p>这些都做好后进行下一步操作</p>
<h4 id="8-编辑controller和compute的环境变量"><a href="#8-编辑controller和compute的环境变量" class="headerlink" title="8.编辑controller和compute的环境变量"></a>8.编辑controller和compute的环境变量</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\#yum install -y iaas-xiandian</span><br></pre></td></tr></table></figure>
<p>接下来是编辑文件/etc/xiandian/openrc.sh,此文件是安装过程中的各项参数，根据每项参数上一行的说明及服务器实际情况进行配置。</p>
<p>首先编辑controller的openrc.sh脚本文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]# </span><br><span class="line"></span><br><span class="line">\#vi &#x2F;etc&#x2F;xiandian&#x2F;openrc.sh</span><br></pre></td></tr></table></figure>
<p>出现如下图的文件内容：</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/6.png">

<p>上图是我已经修改过的（注意：该脚本文件配置每一个环节都不能有错，不然后面有些脚本会执行失败！！！）</p>
<p>配置内容：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br></pre></td><td class="code"><pre><span class="line">HOST_IP&#x3D;192.168.100.10</span><br><span class="line"></span><br><span class="line">HOST_NAME&#x3D;controller</span><br><span class="line"></span><br><span class="line">HOST_IP_NODE&#x3D;192.168.100.20</span><br><span class="line"></span><br><span class="line">HOST_NAME_NODE&#x3D;compute</span><br><span class="line"></span><br><span class="line">RABBIT_USER&#x3D;openstack</span><br><span class="line"></span><br><span class="line">RABBIT_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">DB_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">DOMAIN_NAME&#x3D;demo（自定义）</span><br><span class="line"></span><br><span class="line">ADMIN_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">DEMO_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">KEYSTONE_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">GLANCE_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">GLANCE_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">NOVA_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">NOVA_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">NEUTRON_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">NEUTRON_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">METADATA_SECRET&#x3D;000000</span><br><span class="line"></span><br><span class="line">INTERFACE_NAME&#x3D;enp0s8（外网网卡名，第一篇文章有提到）</span><br><span class="line"></span><br><span class="line">CINDER_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">CINDER_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">TROVE_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">TROVE_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">BLOCK_DISK&#x3D;sdb1（空白分区名，第一篇文章里有提到）</span><br><span class="line"></span><br><span class="line">SWIFT_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">OBJECT_DISK&#x3D;sdc1（空白分区名）</span><br><span class="line"></span><br><span class="line">STORAGE_LOCAL_NET_IP&#x3D;192.168.100.20</span><br><span class="line"></span><br><span class="line">HEAT_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">HEAT_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">CEILOMETER_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">CEILOMETER_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">AODH_DBPASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">AODH_PASS&#x3D;000000</span><br><span class="line"></span><br><span class="line">（注意要去掉前面的‘#’）</span><br></pre></td></tr></table></figure>
<p>保存，退出</p>
<p>至此，controller的openrc.sh配置好了，接下来传给compute的就可以了</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#scp &#x2F;etc&#x2F;xiandian&#x2F;openrc.sh 192.168.100.20:&#x2F;&#x2F;etc&#x2F;xiandian&#x2F;openrc.sh</span><br><span class="line"></span><br><span class="line">输入：yes--输入：000000</span><br></pre></td></tr></table></figure>
<p>此时两个节点的openrc.sh都配好了，建议都进行一下接下来的命令：</p>
<p>controller和compute</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\#source &#x2F;etc&#x2F;xiandian&#x2F;openrc.sh</span><br></pre></td></tr></table></figure>


<p>接下来就是进入脚本跑酷环节！！！</p>
<h4 id="9-通过脚本安装服务"><a href="#9-通过脚本安装服务" class="headerlink" title="9.通过脚本安装服务"></a>9.通过脚本安装服务</h4><p>（内容包括：安装Openstack包，配置域名解析，配置防火墙和Selinux，安装ntp服务）</p>
<p>controller和compute：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\#iaas-pre-host.sh</span><br></pre></td></tr></table></figure>
<p>安装完成后会提示重启。因为我们在本篇内容第一步修改了主机名，所以不需要重启</p>
<h4 id="10-通过脚本安装服务"><a href="#10-通过脚本安装服务" class="headerlink" title="10.通过脚本安装服务"></a>10.通过脚本安装服务</h4><p>（内容包括：安装Mysql数据库服务，安装Mongo数据库服务，安装RabbitMQ服务，安装memcahce）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-mysql.sh</span><br></pre></td></tr></table></figure>


<h4 id="11-通过脚本安装keystone认证服务"><a href="#11-通过脚本安装keystone认证服务" class="headerlink" title="11.通过脚本安装keystone认证服务"></a>11.通过脚本安装keystone认证服务</h4><p>（内容包括：安装keystone服务软件包，创建Keystone数据库，配置数据库连接，为keystone服务创建数据库表，创建令牌，创建签名密钥和证书，定义用户、租户和角色，创建admin-openrc.sh）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-keystone.sh</span><br></pre></td></tr></table></figure>


<h4 id="12-通过脚本安装glance服务"><a href="#12-通过脚本安装glance服务" class="headerlink" title="12.通过脚本安装glance服务"></a>12.通过脚本安装glance服务</h4><p>（内容包括：安装Glance镜像服务软件包，创建Glance数据库，配置文件创建数据库连接，为镜像服务创建数据库表，创建用户，配置镜像服务，创建Endpoint和API端点，启动服务，上传镜像）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-glance.sh</span><br></pre></td></tr></table></figure>


<h4 id="13-通过脚本Nova计算服务"><a href="#13-通过脚本Nova计算服务" class="headerlink" title="13.通过脚本Nova计算服务"></a>13.通过脚本Nova计算服务</h4><p>（内容包括：安装Nova 计算服务软件包，创建Nova数据库，创建计算服务表，创建用户，配置计算服务，创建Endpoint和API端点 ，启动服务，验证Nova，安装Nova计算服务软件包，配置Nova服务，检查系统处理器是否支持虚拟机的硬件加速，启动，清除防火墙）</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-nova-controller.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-nova-compute.sh</span><br></pre></td></tr></table></figure>


<h4 id="14-通过脚本安装neutron服务"><a href="#14-通过脚本安装neutron服务" class="headerlink" title="14.通过脚本安装neutron服务"></a>14.通过脚本安装neutron服务</h4><p>（内容包括：创建Neutron数据库，创建用户，创建Endpoint和API端点 ，安装neutron网络服务软件包，配置Neutron服务，编辑内核，创建数据库，启动服务和创建网桥，安装软件包，配置Neutron服务，编辑内核，启动服务进而创建网桥）</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-neutron-controller.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-neutron-compute.sh</span><br></pre></td></tr></table></figure>


<p>接下来就是网络模式的选择</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">#iaas-install-neutron-controller-      （按两次‘Tab’）   </span><br></pre></td></tr></table></figure>
<p>可以看见：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">iaas-install-neutron-controller-flat.sh </span><br><span class="line"></span><br><span class="line">iaas-install-neutron-controller-gre.sh  </span><br><span class="line"></span><br><span class="line">iaas-install-neutron-controller-vlan.sh</span><br></pre></td></tr></table></figure>
<p>我们选择安装gre.sh</p>
<h4 id="15-选择Neutron网络模式"><a href="#15-选择Neutron网络模式" class="headerlink" title="15.选择Neutron网络模式"></a>15.选择Neutron网络模式</h4><p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">iaas-install-neutron-controller-gre.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]#</span><br><span class="line"></span><br><span class="line">iaas-install-neutron-compute-gre.sh</span><br></pre></td></tr></table></figure>


<h4 id="16-通过脚本安装dashboard服务"><a href="#16-通过脚本安装dashboard服务" class="headerlink" title="16.通过脚本安装dashboard服务"></a>16.通过脚本安装dashboard服务</h4><p>（内容包括：安装Dashboard服务软件包，配置，启动服务）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-dashboard.sh</span><br></pre></td></tr></table></figure>


<p>此时可以通过浏览器网址栏输入<a target="_blank" rel="noopener" href="http://192.168.100.10/dashboard%E8%BF%9B%E5%85%A5%E5%85%88%E7%94%B5%E4%BA%91%E8%AE%A1%E7%AE%97%E5%B9%B3%E5%8F%B0">http://192.168.100.10/dashboard进入先电云计算平台</a></p>
<p>域：demo</p>
<p>用户名：admin</p>
<p>密码：000000</p>
<h4 id="17-网络–网络–创建网络"><a href="#17-网络–网络–创建网络" class="headerlink" title="17.网络–网络–创建网络"></a>17.网络–网络–创建网络</h4><p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/7.png">点击创建网络，我这里已经创建好了</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/8.png">

<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/9.png">

<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/10.png">

<p>点击已创建</p>
<h4 id="18-管理员–网络–创建网络"><a href="#18-管理员–网络–创建网络" class="headerlink" title="18.管理员–网络–创建网络"></a>18.管理员–网络–创建网络</h4><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/11.png">

<p>提交</p>
<p>创建好后–点击网络名称中的ext</p>
<p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/12.png">子网–创建子网</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/13.png">

<p>下一步</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/14.png">

<p>已创建</p>
<h4 id="19-网络–路由–新建路由"><a href="#19-网络–路由–新建路由" class="headerlink" title="19.网络–路由–新建路由"></a>19.网络–路由–新建路由</h4><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/15.png">

<p>点路由名称route–接口–增加</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/16.png">



<h4 id="20-安装cinder之前做个准备工作"><a href="#20-安装cinder之前做个准备工作" class="headerlink" title="20.安装cinder之前做个准备工作"></a>20.安装cinder之前做个准备工作</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]# </span><br><span class="line"></span><br><span class="line">\#source &#x2F;etc&#x2F;keystone&#x2F;admin-openrc.sh</span><br><span class="line"></span><br><span class="line">\# glance image-create --name centos7 --disk-format qcow2 --container-format bare --progress &lt; &#x2F;opt&#x2F;iaas&#x2F;images&#x2F;CentOS_7.2_x86_64_XD.qcow2 </span><br><span class="line"></span><br><span class="line">（此处将CentOS的镜像上传，下一步可以一次在平台上建立一个虚拟机，做测试）</span><br></pre></td></tr></table></figure>


<p>上一篇文章介绍了如何用secureCRTP上传镜像，其中补充了一个小镜像也可以用上面一样的命令上传到先电平台</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\# glance image-create --name cirros --disk-format qcow2 --container-format bare --progress &lt; &#x2F;opt&#x2F;iaas&#x2F;images&#x2F;cirros-0.3.4-x86_64-disk.img</span><br></pre></td></tr></table></figure>




<h4 id="21-在云平台中–计算–云主机–创建云主机"><a href="#21-在云平台中–计算–云主机–创建云主机" class="headerlink" title="21.在云平台中–计算–云主机–创建云主机"></a>21.在云平台中–计算–云主机–创建云主机</h4><p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/17.png"><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/18.png"><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/19.png"><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/20.png"></p>
<p>启动实例</p>
<p>绑定浮动IP–‘+’–分配IP–关联</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/21.png">

<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/22.png">



<h4 id="22-计算–访问-amp-安全–（defult）管理规则–删除原有的规则–添加规则"><a href="#22-计算–访问-amp-安全–（defult）管理规则–删除原有的规则–添加规则" class="headerlink" title="22.计算–访问&amp;安全–（defult）管理规则–删除原有的规则–添加规则"></a>22.计算–访问&amp;安全–（defult）管理规则–删除原有的规则–添加规则</h4><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/23.png">

<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/24.png">

<p>分别添加–所有ICMP，所有TCP，所有UDP–并且各自添加 出口 和 入口</p>
<p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/25.png">如上图所示</p>
<p>此时可以访问之前创建好的云主机123了，启动云主机后，可以直接在CRT上连接</p>
<p>好，继续脚本跑酷！！！</p>
<h4 id="23-通过脚本安装Cinder服务"><a href="#23-通过脚本安装Cinder服务" class="headerlink" title="23.通过脚本安装Cinder服务"></a>23.通过脚本安装Cinder服务</h4><p>（内容包括：安装Cinder块存储服务软件包，创建数据库，创建用户，创建Endpoint和API端点 ，配置Cinder服务，创建数据库，启动服务，安装块存储软件，创建LVM物理和逻辑卷，修改Cinder配置文件，重启服务，验证）</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-cinder-controller.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]# </span><br><span class="line"></span><br><span class="line">\#iaas-install-cinder-compute.sh</span><br></pre></td></tr></table></figure>


<p>完成后接着还有一步：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#source &#x2F;etc&#x2F;keystone&#x2F;admin-openrc.sh</span><br></pre></td></tr></table></figure>


<h4 id="24-通过脚本安装Swift服务"><a href="#24-通过脚本安装Swift服务" class="headerlink" title="24.通过脚本安装Swift服务"></a>24.通过脚本安装Swift服务</h4><p>（内容包括：创建用户，创建Endpoint和API端点 ，编辑/etc/swift/proxy-server.conf，创建账号、容器、对象，编辑/etc/swift/swift.conf，启动服务和赋予权限，安装软件包，配置rsync，配置账号、容器和对象，修改Swift配置文件，重启服务和赋予权限）</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-swift-controller.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]# </span><br><span class="line"></span><br><span class="line">\#iaas-install-swift-compute.sh</span><br></pre></td></tr></table></figure>


<h4 id="25-通过脚本安装Trove服务"><a href="#25-通过脚本安装Trove服务" class="headerlink" title="25.通过脚本安装Trove服务"></a>25.通过脚本安装Trove服务</h4><p>（内容包括：安装Trove数据库服务的软件包，创建数据库，创建用户，创建Endpoint和API端点 ，配置trove.conf文件，配置trove-taskmanager.conf，配置trove-conductor.conf文件，配置trove-guestagent.conf，同步数据库，启动服务）</p>
<p>需注意安装Trove服务之前需要配置好网络（flat或gre）,创建好子网，并确认系统已经安装swift和cinder两个服务，否则安装会失败。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-trove.sh</span><br></pre></td></tr></table></figure>


<h4 id="26-查看上传的镜像"><a href="#26-查看上传的镜像" class="headerlink" title="26.查看上传的镜像"></a>26.查看上传的镜像</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#cat &#x2F;usr&#x2F;local&#x2F;bin&#x2F;iaas-install-trove.sh</span><br></pre></td></tr></table></figure>
<p>（查看上传的镜像）</p>
<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/26.png">



<h4 id="27-上传镜像"><a href="#27-上传镜像" class="headerlink" title="27.上传镜像"></a>27.上传镜像</h4><p>将提供的MySQL_5.6_xiandian.qcow2 上传到系统内</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#glance image-create --name &quot;mysql-5.6&quot; --disk-format qcow2 --container-format bare --progress &lt; MySQL_5.6_XD.qcow2</span><br></pre></td></tr></table></figure>


<img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/27.png">

<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">\# ls &#x2F;opt&#x2F;iaas&#x2F;images</span><br></pre></td></tr></table></figure>
<p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/28.png">如上图可以查看到 MySQL_5.6_XD.qcow2 已经成功上传</p>
<h4 id="28-创建数据库存储"><a href="#28-创建数据库存储" class="headerlink" title="28.创建数据库存储"></a>28.创建数据库存储</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\# trove-manage datastore_update mysql &#39;&#39;</span><br></pre></td></tr></table></figure>


<h4 id="29-使用上传的镜像更新数据库"><a href="#29-使用上传的镜像更新数据库" class="headerlink" title="29.使用上传的镜像更新数据库"></a>29.使用上传的镜像更新数据库</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\# trove-manage datastore_version_update mysql mysql-5.6 mysql $&#123;Glance_Image_ID&#125; &#39;&#39; 1</span><br></pre></td></tr></table></figure>
<p>将其中${Glance_Image_ID} 改为26节第一张图里面的ID后面的字符串</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">\# trove create mysql-1 $&#123;FLAVOR_ID&#125; --size 5 --databases myDB --users user:r00tme --datastore_version mysql-5.6 --datastore </span><br><span class="line"></span><br><span class="line">mysql</span><br></pre></td></tr></table></figure>
<p>将其中${FLAVOR_ID}改为2</p>
<p>创建完成后查询trove列表</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#trove list</span><br></pre></td></tr></table></figure>


<h4 id="30-通过脚本安装heat服务"><a href="#30-通过脚本安装heat服务" class="headerlink" title="30.通过脚本安装heat服务"></a>30.通过脚本安装heat服务</h4><p>（内容包括：安装heat编配服务软件包，创建数据库，创建用户，创建Endpoint和API端点 ，配置Heat服务，创建数据库，启动服务）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-heat.sh</span><br></pre></td></tr></table></figure>


<h4 id="31-nginx模板"><a href="#31-nginx模板" class="headerlink" title="31.nginx模板"></a>31.nginx模板</h4><p>nginx模板文件存放在/etc/xiandian/目录下，在使用模板之前需成功安装，ceilometer监控服务以及alarm监控服务。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#ls &#x2F;etc&#x2F;xiandian&#x2F;</span><br></pre></td></tr></table></figure>
<p>可以查看nginx模板</p>
<p>构建一台http服务器，将lb-server.yaml模板文件上传至http服务器中。</p>
<h4 id="32-通过脚本安装Ceilometer服务"><a href="#32-通过脚本安装Ceilometer服务" class="headerlink" title="32.通过脚本安装Ceilometer服务"></a>32.通过脚本安装Ceilometer服务</h4><p>（内容包括：安装Ceilometer监控服务软件包，创建数据库，创建用户，创建Endpoint和API端点 ，配置Ceilometer，启动服务，监控组件，安装软件包，配置Ceilometer）</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-ceilometer-controller.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]# </span><br><span class="line"></span><br><span class="line">\#iaas-install-ceilometer-compute.sh</span><br></pre></td></tr></table></figure>


<h4 id="33-通过脚本安装alarm服务"><a href="#33-通过脚本安装alarm服务" class="headerlink" title="33.通过脚本安装alarm服务"></a>33.通过脚本安装alarm服务</h4><p>（内容包括：创建数据库，创建keystone用户，创建Endpoint和API，安装软件包，配置aodh，同步数据库，启动服务）</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-alarm.sh</span><br></pre></td></tr></table></figure>


<h4 id="34-添加控制节点资源到云平台"><a href="#34-添加控制节点资源到云平台" class="headerlink" title="34.添加控制节点资源到云平台"></a>34.添加控制节点资源到云平台</h4><p>修改openrc.sh，把compute节点的IP和主机名改为controller节点的IP和主机名</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@compute ~]# </span><br><span class="line"></span><br><span class="line">\#vi &#x2F;etc&#x2F;xiandian&#x2F;openrc.sh</span><br></pre></td></tr></table></figure>
<p>修改以下参数为：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">HOST_IP_NODE&#x3D;192.168.100.10</span><br><span class="line"></span><br><span class="line">HOST_NAME_NODE&#x3D;controller</span><br></pre></td></tr></table></figure>
<p>保存退出</p>
<p><img src= "/fhangh/img/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/4.Iaas%E6%90%AD%E5%BB%BA/29.png">修改结果如上图所示</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-install-nova-compute.sh</span><br></pre></td></tr></table></figure>
<p>将compute的资源添加到controller中</p>
<p>最后提供一个卸载脚本命令</p>
<h4 id="35-系统卸载"><a href="#35-系统卸载" class="headerlink" title="35.系统卸载"></a>35.系统卸载</h4><p>系统提供一键卸载脚本，节点运行iaas-uninstall-all.sh脚本，脚本卸载当前节点的所有云平台数据，如果卸载节点为controller节点则会清除所有的数据（此时云平台也被清空），如果卸载节点为compute节点则会删除compute节点的数据。</p>
<p>controller和compute同时：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[root@controller ~]#</span><br><span class="line"></span><br><span class="line">\#iaas-uninstall-all.sh</span><br><span class="line"></span><br><span class="line">[root@compute ~]# </span><br><span class="line"></span><br><span class="line">\#iaas-uninstall-all.sh</span><br></pre></td></tr></table></figure>
<p>至此，IAAS平台搭建完成！！！</p>
<p>请看下一篇PAAS的平台搭建！！！</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">FHang</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://fhangh.gitee.io/article/264a9a95.html">https://fhangh.gitee.io/article/264a9a95.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://fhangh.gitee.io" target="_blank">Element</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/fhangh/tags/IaaS/">IaaS</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_07.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/fhangh/article/89c76bbc.html"><img class="prev-cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_78.jpg" onerror="onerror=null;src='/fhangh/img/404.jpg'"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">BlogTest</div></div></a></div><div class="next-post pull-right"><a href="/fhangh/article/373ebcdf.html"><img class="next-cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_09.jpg" onerror="onerror=null;src='/fhangh/img/404.jpg'"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">secureCRT上传镜像</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/fhangh/article/373ebcdf.html" title="secureCRT上传镜像"><img class="cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_09.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-11-05</div><div class="title">secureCRT上传镜像</div></div></a></div><div><a href="/fhangh/article/40c15609.html" title="secureCRT连接虚拟机"><img class="cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_08.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-11-05</div><div class="title">secureCRT连接虚拟机</div></div></a></div><div><a href="/fhangh/article/229dff60.html" title="不同虚拟机的配置方式"><img class="cover" data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_06.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-11-05</div><div class="title">不同虚拟机的配置方式</div></div></a></div></div></div></div><div class="aside_content" id="aside_content"><div class="card-widget card-info"><div class="card-content"><div class="card-info-avatar is-center"><img class="avatar-img" data-lazy-src="/fhangh/img/fh.png" onerror="this.onerror=null;this.src='/fhangh/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">FHang</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/fhangh/archives/"><div class="headline">文章</div><div class="length-num">26</div></a></div><div class="card-info-data-item is-center"><a href="/fhangh/tags/"><div class="headline">标签</div><div class="length-num">10</div></a></div><div class="card-info-data-item is-center"><a href="/fhangh/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/FHangH"><i class="fab fa-github"></i><span>Link To</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/FHangH" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:752972182@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div></div><div class="card-widget card-announcement"><div class="card-content"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">个人学习笔记</div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="card-content"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Iaas%E6%90%AD%E5%BB%BA"><span class="toc-number">1.</span> <span class="toc-text">Iaas搭建</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E4%B8%BB%E6%9C%BA%E5%90%8D%E7%9A%84%E9%85%8D%E7%BD%AE"><span class="toc-number">1.0.0.1.</span> <span class="toc-text">1.主机名的配置</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-%E9%85%8D%E7%BD%AE%E6%98%A0%E5%B0%84%E6%96%87%E4%BB%B6"><span class="toc-number">1.0.0.2.</span> <span class="toc-text">2.配置映射文件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-%E9%85%8D%E7%BD%AEcontroller%E7%9A%84yum%E6%BA%90"><span class="toc-number">1.0.0.3.</span> <span class="toc-text">3.配置controller的yum源</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-%E6%8C%82%E8%BD%BDiso%E6%96%87%E4%BB%B6%EF%BC%88%E4%B8%8A%E4%B8%80%E7%AF%87%E4%B8%8A%E4%BC%A0%E9%95%9C%E5%83%8F%E5%90%8E%EF%BC%8C%E6%89%8D%E8%83%BD%E7%BB%A7%E7%BB%AD%E8%BF%9B%E8%A1%8C%E6%8E%A5%E4%B8%8B%E6%9D%A5%E7%9A%84IAAS%E6%90%AD%E5%BB%BA%EF%BC%89"><span class="toc-number">1.0.0.4.</span> <span class="toc-text">4.挂载iso文件（上一篇上传镜像后，才能继续进行接下来的IAAS搭建）</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#5-%E6%90%AD%E5%BB%BAftp%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%8C%E5%BC%80%E5%90%AF%E5%B9%B6%E8%AE%BE%E7%BD%AE%E8%87%AA%E5%90%AF"><span class="toc-number">1.0.0.5.</span> <span class="toc-text">5.搭建ftp服务器，开启并设置自启</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#6-%E5%85%B3%E9%97%AD%E9%98%B2%E7%81%AB%E5%A2%99%E5%B9%B6%E8%AE%BE%E7%BD%AE%E5%BC%80%E6%9C%BA%E4%B8%8D%E8%87%AA%E5%90%AF"><span class="toc-number">1.0.0.6.</span> <span class="toc-text">6.关闭防火墙并设置开机不自启</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-%E9%85%8D%E7%BD%AEcompute%E7%9A%84yum%E6%BA%90"><span class="toc-number">1.0.0.7.</span> <span class="toc-text">7.配置compute的yum源</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#8-%E7%BC%96%E8%BE%91controller%E5%92%8Ccompute%E7%9A%84%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="toc-number">1.0.0.8.</span> <span class="toc-text">8.编辑controller和compute的环境变量</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#9-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.9.</span> <span class="toc-text">9.通过脚本安装服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#10-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.10.</span> <span class="toc-text">10.通过脚本安装服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#11-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85keystone%E8%AE%A4%E8%AF%81%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.11.</span> <span class="toc-text">11.通过脚本安装keystone认证服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#12-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85glance%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.12.</span> <span class="toc-text">12.通过脚本安装glance服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%ACNova%E8%AE%A1%E7%AE%97%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.13.</span> <span class="toc-text">13.通过脚本Nova计算服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#14-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85neutron%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.14.</span> <span class="toc-text">14.通过脚本安装neutron服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#15-%E9%80%89%E6%8B%A9Neutron%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%BC%8F"><span class="toc-number">1.0.0.15.</span> <span class="toc-text">15.选择Neutron网络模式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#16-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85dashboard%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.16.</span> <span class="toc-text">16.通过脚本安装dashboard服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#17-%E7%BD%91%E7%BB%9C%E2%80%93%E7%BD%91%E7%BB%9C%E2%80%93%E5%88%9B%E5%BB%BA%E7%BD%91%E7%BB%9C"><span class="toc-number">1.0.0.17.</span> <span class="toc-text">17.网络–网络–创建网络</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-%E7%AE%A1%E7%90%86%E5%91%98%E2%80%93%E7%BD%91%E7%BB%9C%E2%80%93%E5%88%9B%E5%BB%BA%E7%BD%91%E7%BB%9C"><span class="toc-number">1.0.0.18.</span> <span class="toc-text">18.管理员–网络–创建网络</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#19-%E7%BD%91%E7%BB%9C%E2%80%93%E8%B7%AF%E7%94%B1%E2%80%93%E6%96%B0%E5%BB%BA%E8%B7%AF%E7%94%B1"><span class="toc-number">1.0.0.19.</span> <span class="toc-text">19.网络–路由–新建路由</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#20-%E5%AE%89%E8%A3%85cinder%E4%B9%8B%E5%89%8D%E5%81%9A%E4%B8%AA%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="toc-number">1.0.0.20.</span> <span class="toc-text">20.安装cinder之前做个准备工作</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#21-%E5%9C%A8%E4%BA%91%E5%B9%B3%E5%8F%B0%E4%B8%AD%E2%80%93%E8%AE%A1%E7%AE%97%E2%80%93%E4%BA%91%E4%B8%BB%E6%9C%BA%E2%80%93%E5%88%9B%E5%BB%BA%E4%BA%91%E4%B8%BB%E6%9C%BA"><span class="toc-number">1.0.0.21.</span> <span class="toc-text">21.在云平台中–计算–云主机–创建云主机</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#22-%E8%AE%A1%E7%AE%97%E2%80%93%E8%AE%BF%E9%97%AE-amp-%E5%AE%89%E5%85%A8%E2%80%93%EF%BC%88defult%EF%BC%89%E7%AE%A1%E7%90%86%E8%A7%84%E5%88%99%E2%80%93%E5%88%A0%E9%99%A4%E5%8E%9F%E6%9C%89%E7%9A%84%E8%A7%84%E5%88%99%E2%80%93%E6%B7%BB%E5%8A%A0%E8%A7%84%E5%88%99"><span class="toc-number">1.0.0.22.</span> <span class="toc-text">22.计算–访问&amp;安全–（defult）管理规则–删除原有的规则–添加规则</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#23-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85Cinder%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.23.</span> <span class="toc-text">23.通过脚本安装Cinder服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#24-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85Swift%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.24.</span> <span class="toc-text">24.通过脚本安装Swift服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#25-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85Trove%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.25.</span> <span class="toc-text">25.通过脚本安装Trove服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#26-%E6%9F%A5%E7%9C%8B%E4%B8%8A%E4%BC%A0%E7%9A%84%E9%95%9C%E5%83%8F"><span class="toc-number">1.0.0.26.</span> <span class="toc-text">26.查看上传的镜像</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#27-%E4%B8%8A%E4%BC%A0%E9%95%9C%E5%83%8F"><span class="toc-number">1.0.0.27.</span> <span class="toc-text">27.上传镜像</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#28-%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93%E5%AD%98%E5%82%A8"><span class="toc-number">1.0.0.28.</span> <span class="toc-text">28.创建数据库存储</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#29-%E4%BD%BF%E7%94%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E9%95%9C%E5%83%8F%E6%9B%B4%E6%96%B0%E6%95%B0%E6%8D%AE%E5%BA%93"><span class="toc-number">1.0.0.29.</span> <span class="toc-text">29.使用上传的镜像更新数据库</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#30-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85heat%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.30.</span> <span class="toc-text">30.通过脚本安装heat服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#31-nginx%E6%A8%A1%E6%9D%BF"><span class="toc-number">1.0.0.31.</span> <span class="toc-text">31.nginx模板</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#32-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85Ceilometer%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.32.</span> <span class="toc-text">32.通过脚本安装Ceilometer服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#33-%E9%80%9A%E8%BF%87%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85alarm%E6%9C%8D%E5%8A%A1"><span class="toc-number">1.0.0.33.</span> <span class="toc-text">33.通过脚本安装alarm服务</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#34-%E6%B7%BB%E5%8A%A0%E6%8E%A7%E5%88%B6%E8%8A%82%E7%82%B9%E8%B5%84%E6%BA%90%E5%88%B0%E4%BA%91%E5%B9%B3%E5%8F%B0"><span class="toc-number">1.0.0.34.</span> <span class="toc-text">34.添加控制节点资源到云平台</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#35-%E7%B3%BB%E7%BB%9F%E5%8D%B8%E8%BD%BD"><span class="toc-number">1.0.0.35.</span> <span class="toc-text">35.系统卸载</span></a></li></ol></li></ol></li></ol></li></ol></div></div></div><div class="card-widget card-recent-post"><div class="card-content"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/3fadb38f.html" title="UE4联网和多人游戏"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_27.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4联网和多人游戏"/></a><div class="content"><a class="title" href="/fhangh/article/3fadb38f.html" title="UE4联网和多人游戏">UE4联网和多人游戏</a><time datetime="2022-05-26T14:04:45.432Z" title="发表于 2022-05-26 22:04:45">2022-05-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/7dd18469.html" title="UE4 RPC"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_26.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 RPC"/></a><div class="content"><a class="title" href="/fhangh/article/7dd18469.html" title="UE4 RPC">UE4 RPC</a><time datetime="2022-05-19T04:30:00.826Z" title="发表于 2022-05-19 12:30:00">2022-05-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/cb9854b2.html" title="UE4 MySQL插件使用"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_25.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 MySQL插件使用"/></a><div class="content"><a class="title" href="/fhangh/article/cb9854b2.html" title="UE4 MySQL插件使用">UE4 MySQL插件使用</a><time datetime="2022-03-27T06:49:30.840Z" title="发表于 2022-03-27 14:49:30">2022-03-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/605bd1ac.html" title="UE4 MySQL插件开发"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_24.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="UE4 MySQL插件开发"/></a><div class="content"><a class="title" href="/fhangh/article/605bd1ac.html" title="UE4 MySQL插件开发">UE4 MySQL插件开发</a><time datetime="2022-03-26T07:56:25.807Z" title="发表于 2022-03-26 15:56:25">2022-03-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/fhangh/article/f7ede91d.html" title="Java基础"><img data-lazy-src="https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img_mini/postImg_19.jpg" onerror="this.onerror=null;this.src='/fhangh/img/404.jpg'" alt="Java基础"/></a><div class="content"><a class="title" href="/fhangh/article/f7ede91d.html" title="Java基础">Java基础</a><time datetime="2021-12-12T07:47:44.788Z" title="发表于 2021-12-12 15:47:44">2021-12-12</time></div></div></div></div></div></div></div></main><footer id="footer" style="background-image: url(https://cdn.jsdelivr.net/gh/FHangH/FHangBlogCDN/Post_Img/postImg_07.jpg)"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By FHang</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="/fhangh/js/utils.js"></script><script src="/fhangh/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/fhangh/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> {preloader.endLoading()})</script><div class="js-pjax"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="true"></script></div></body></html>